import request from "@/utils/request";
export default {
  //POST /admin/product/baseTrademark/save
  //PUT /admin/product/baseTrademark/update
  //增加和修改 添加品牌的时候的不需要id  修改品牌的需要id
  addOrUpdate(trademark){
    if(trademark.id){
      return request.put('/admin/product/baseTrademark/update',trademark)
    }else {
      return  request.post('/admin/product/baseTrademark/save',trademark)
    }
  },

  //GET /admin/product/baseTrademark/{page}/{limit}
  getPageList(page,limit){
    return request.get(`/admin/product/baseTrademark/${page}/${limit}`)
  },
  //DELETE /admin/product/baseTrademark/remove/{id} 删除trademark
  delete(id){
    return request.delete(`/admin/product/baseTrademark/remove/${id}`)
  },
  //获取所有的品牌列表
//get/admin/product/baseTrademark/getTrademarkList
  getList(){
    return request.get('/admin/product/baseTrademark/getTrademarkList')
  }

}
